package com.deram.ctin.serv.member.api.impl;

import com.deram.ctin.common.bean.PageResult;
import com.deram.ctin.serv.member.api.MemberFeedbackApi;
import com.deram.ctin.serv.member.entity.MemberFeedback;
import com.deram.ctin.serv.member.filter.MemberFeedbackFilter;
import com.deram.ctin.serv.member.service.MemberFeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: jtt
 * @Description:
 * @Date: 2017/9/21 16:56
 * @version: V1.0
 */
@RestController
public class MemberFeedbackApiImpl implements MemberFeedbackApi {

    @Autowired
    MemberFeedbackService memberFeedbackService;

    @Override
    public MemberFeedback find(Long id) {
        return memberFeedbackService.find(id);
    }

    @Override
    public List<MemberFeedback> list(MemberFeedbackFilter filter) {
        return memberFeedbackService.list(filter);
    }

    @Override
    public MemberFeedback save(@RequestBody MemberFeedback param) {
        return memberFeedbackService.save(param);
    }

    @Override
    public PageResult<MemberFeedback> search(MemberFeedbackFilter filter, Integer pageNo, Integer pageSize) {
        return memberFeedbackService.search(filter, pageNo, pageSize);
    }

    @Override
    public void delete(Long id) {
        memberFeedbackService.delete(id);
    }
}
